<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/6 0006
 * Time: 17:01
 */

namespace app\home\controller;

use think\Controller;

use app\home\model\BfConfig;

class BaseController extends Controller{
    
    public function getSEOinfo(){
        $seo = BfConfig :: where(['type'=>2]) -> select();
        return [
            'title' => $seo[0]['value'],
            'keyword' => $seo[1]['value'],
            'description' => $seo[2]['value'],
            'headcode' => $seo[3]['value'],
            'bodycode' => $seo[4]['value']
        ];
    }
    
    public function getWebinfo(){
        $info = BfConfig :: where(['type'=>1]) -> select();
        return [
            'webname' => $info[0]['value'],
            'weburl' => $info[1]['value'],
            'mail' => $info[2]['value'],
            'tel' => $info[3]['value'],
            'addr' => $info[4]['value'],
            'copyright' => $info[5]['value']
        ];
    }
}